In Typescript there’s something called generics that allows you to write functions or classes that can defined with a generic type parameter (placeholder) that will be replaced by the actual type that’s passed into the function.
This allows us to write more flexible functions and up with less duplicated code.